<?php

class Social_Controller_Connect_Facebook extends Controller
{

    public function actionAuth()
    {
        $provider = Agis::getHelper('social@service') -> getProvider('facebook');

        $url = $provider -> getAuthUrl();

        $this -> redirect($url);
    }

    public function actionCallback()
    {
        $provider = Agis::getHelper('social@service') -> getProvider('facebook');

        $provider -> doConnect($this -> _request);

        $this -> redirect('');

    }

    public function actionLogout()
    {
        $provider = Agis::getHelper('social@service') -> getProvider('facebook');

        $url = $service -> getLogoutUrl();

        $this -> redirect($url);
    }

    public function actionCancel()
    {

    }

}
